package com.asset.salesforce.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.asset.salesforce.dao.DeletedAccountDaoImpl;
import com.asset.salesforce.dao.DeletedContactDaoImpl;
import com.asset.salesforce.domain.DeletedAccount;
import com.asset.salesforce.domain.DeletedContact;

@Service
@Transactional(readOnly=true)
public class DeletedContactService {
	@Autowired 
	private DeletedContactDaoImpl deletedContactDaoImpl;
	
	@Transactional(readOnly=false)
	public DeletedContact addDeletedContact(DeletedContact deletedContact) {
		deletedContactDaoImpl.add(deletedContact);
		 return deletedContact;
	}
	public DeletedContact getById(DeletedContact deletedContact) {
		return deletedContactDaoImpl.getById(deletedContact.getId(), new DeletedContact());
	}
	
	public List<DeletedContact> getAll() {
		return deletedContactDaoImpl.getAll(new DeletedContact());
	}


}
